import React from 'react';
import { Carousel, WingBlank } from 'antd-mobile';
import Loading from '../../base/Loading'
export default (props)=>{
  return (
    <div className="recommend">
    <div className="banner">
    <WingBlank>
      <Carousel className="space-carousel"
        frameOverflow="visible"
        cellSpacing={10}
        slideWidth={0.8}
        autoplay
        infinite
      >
        {
          (props.slider && props.slider.length>0)?
            props.slider.map((val, index) => (
              <a
                key={val}
                href="http://www.alipay.com"
                style={{
                  display: 'block',
                  position: 'relative',
                  boxShadow: '2px 1px 1px rgba(0, 0, 0, 0.2)',
                }}
              >
                <img
                  src={val}
                  alt=""
                  style={{ width: '100%', verticalAlign: 'top' }}
                  onLoad={() => {
                    // fire window resize event to change height
                    window.dispatchEvent(new Event('resize'));
                  }}
                />
              </a>
            ))
          : <Loading title="加载中"></Loading>
        }
      </Carousel>
    </WingBlank>
    </div>
    <div className="station">
      <h2 className="sta_title">电台</h2>
      <ul>
        {
          props.radioList.map((value,index)=>(
          <a href="/#/songList/26" key={value.id}>
            <li>
              <div>
                <img alt="" src={value.picUrl}/>
                <span className="iconfont icon-bofang"></span>
              </div>
              <h2 className="station_name">{value.title}</h2>
            </li>
          </a>
          ))
        }
      </ul>
    </div>
    <div className="foot">
      <p className="foot_computer">
        <a href="https://y.qq.com/?ADTAG=myqq&amp;nomobile=1#type=index">查看电脑版网页</a>
      </p>
      <p className="foot_logo">
        <img src="http://y.gtimg.cn/mediastyle/mod/mobile/img/logo_ch.svg?max_age=2592000" alt=""/>
      </p>
      <div className="copyright">
        <p>Copyright © 1998 -  Tencent. All Rights Reserved.</p>
        <p>联系电话：0755-86013388 QQ群：55209235</p>
      </div>
    </div>
  </div>
  )
}